package com.shenyue.nbtownlet.model;

import android.content.Context;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.shenyue.nbtownlet.event.BaseListener;
import com.shenyue.nbtownlet.util.StorageUtil;
import com.shenyue.nbtownlet.util.StringUtil;

/**
 * 通知公告
 */

public class AppNoticeModel {
    private static final String ROOT = "SmallTown/XCZNotice";
    private static final String ROOT_DATA = "$smalltown_xcznotice_data$";
    /***通知公告详情表单接口****/
    public static final String GETNOTICEDATA = "getnoticedata";
    public static final String GETNOTICEDATA_ACTION = "$getnoticedata_action$";

    public static void GetNoticeData(final Context context, JSONObject param, final BaseListener listener) {
        HttpClientExManager.instance().get(AppModel.kBaseURL + "/" + ROOT + "/" + GETNOTICEDATA, GETNOTICEDATA_ACTION, param, new BaseListener() {
            @Override
            public void success(String val, String action) {
                if (listener != null)
                    listener.success(val, action);
            }

            @Override
            public void error(String error, String action) {
                if (listener != null)
                    listener.error(error, action);
            }
        });
    }
}
